//
//  HistoryVariable.h
//  histoval
//
//  Created by Daniel Braun on 14/06/07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#import "EDSortedArray.h"
#import "HistoricVariableBase.h"



@interface HistoEntry : HistoEntryBase {
	@public
	double _value;
}
- initWithValue:(double)value date:(NSDate *)date;

@end



@interface HistoryVariable : HistoricVariableBase {
}

//- (EDSortedArray *)_historic;

- (void) setValue:(NSNumber *)v;
- (void) setDValue:(double )v;
- (NSNumber *) value;
- (double) dvalue;

- (void) setValue:(NSNumber *)v atDate:(NSDate *)date;
- (void) setDValue:(double)v atDate:(NSDate *)date;

- (NSNumber *) valueAtDate:(NSDate *)date;
- (double) dvalueAtDate:(NSDate *)date;
- (NSNumber *) interpolatedValueAtDate:(NSDate *)date;
- (double) interpolatedDValueAtDate:(NSDate *)date;

- (NSNumber *) averageValueBetween:(NSDate *)d1 and:(NSDate *)d2;
- (double) daverageValueBetween:(NSDate *)d1 and:(NSDate *)d2;


- (double) evolutionBetween:(NSDate *)d1 and:(NSDate *)d2;

@end
